package be.pollsg1.service.impl;

import java.util.List;

import javax.ejb.EJB;

import be.pollsg1.entity.Poll;
import be.pollsg1.repositories.PollRepositoryRemote;
import be.pollsg1.service.PollServiceBusinessLocal;
import be.pollsg1.service.PollServiceBusinessRemote;

public class PollServiceBusiness implements PollServiceBusinessLocal,
		PollServiceBusinessRemote {
   
	@EJB
	private	PollRepositoryRemote pollRepository; 
	
	@Override
	public Poll findById(Long id) {
		return pollRepository.findById(id);
	}

	@Override
	public Poll insert(Poll poll) {
		return pollRepository.insert(poll);
	}

	@Override
	public Poll update(Poll poll) {
		
		return pollRepository.update(poll);
	}

	@Override
	public void delete(Poll poll) {
		pollRepository.delete(poll);

	}

	@Override
	public List<Poll> findAll() {
		// TODO Auto-generated method stub
		return pollRepository.findAll();
	}

	
}
